Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: added auto reply to contact form #3615

Merged
merged 27 commits into from
Feb 21, 2024

Conversation

kyrena
Copy link
Contributor

@kyrena kyrena commented Oct 27, 2023

Description

This PR allow admin to configure an email confirmation for the customer when a customer (registered or not) use the contact form.

Todo? remove changes from next branch (Mage::throwException, _redirect, ...) and add design to email template.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: Contacts Relates to Mage_Contacts translations Relates to app/locale labels Oct 27, 2023
@ADDISON74 ADDISON74 self-assigned this Oct 27, 2023
@ADDISON74
Copy link
Contributor

This PR works as expected.

A few changes...

1 - I would create a separate section called Auto Reply. It would look more elegant, in addition, there is an enable/disable option. See bellow

BEFORE

autoreply2

AFTER

autoreply

2 - One of the email templates must be identified and used for the auto reply, because messages sent to visitors have a default format (logo, ...). On this occasion, the contact template that the store receives should also be changed. It is ugly, a relic from the past. Of course, in other PR.

3 - The subject must be set as Contact Form Confirmation.

4 - The message in the body must be polite. E.g. "Thank you for contacting us. We will reply you shortly. Have a nice day."

@fballiano fballiano marked this pull request as ready for review February 16, 2024 11:04
@fballiano fballiano changed the title Added auto reply for contact form New feature: Added auto reply to contact form Feb 16, 2024
@fballiano fballiano changed the title New feature: Added auto reply to contact form New feature: added auto reply to contact form Feb 16, 2024
@fballiano
Copy link
Contributor

@ADDISON74 I should have fixed all of your notes, from my tests the PR works as intended. I didn't work on point n.2 because I think it's a big topic for another PR (or more).

@fballiano
Copy link
Contributor

Since I changed a lot of stuff here, although I tested it, I won't put my green check on this, at the moment, and wait for other reviewers.

@Flyingmana
Copy link
Contributor

I think this needs a warning on the setting that an activated one can be used to spam email addresses.

maybe something for a future iteration(does not need to be part of this PR) a setting to limit it to logged in users, and making sure only the account email is used as sender

@fballiano
Copy link
Contributor

@Flyingmana very nice catch, I've added a warning message, which is absolutely necessary. At a later time we could enable ratelimiting for the contact us form.

ADDISON74
ADDISON74 previously approved these changes Feb 16, 2024
@ADDISON74
Copy link
Contributor

Please ignore my green stamp. I chose something else after making the comment in the code. I will check the new changes, at first glance they are fine.

@fballiano - Did you make the change for point 1 as well?

@fballiano
Copy link
Contributor

@fballiano - Did you make the change for point 1 as well?

yep

Screenshot 2024-02-16 alle 16 37 09

@ADDISON74
Copy link
Contributor

The warning message does not resemble what already exists through the Backend. I will make you a proposal.

The first word Warning should be in red.

@fballiano
Copy link
Contributor

I don't think it's possible to have html in that message (make it red)

@ADDISON74
Copy link
Contributor

ADDISON74 commented Feb 18, 2024

Html is possible, it needs to be wrapped into <![CDATA[]]>

For example check this file /app/code/core/Mage/Checkout/etc/system.xml

@fballiano
Copy link
Contributor

Html is possible, it needs to be wrapped into <![CDATA[]]>

For example check this file /app/code/core/Mage/Checkout/etc/system.xml

you live you learn :-D

@fballiano
Copy link
Contributor

The warning message does not resemble what already exists through the Backend. I will make you a proposal.

I'll wait for this

@ADDISON74 ADDISON74 removed their assignment Feb 20, 2024
@fballiano
Copy link
Contributor

retested, works ok

@fballiano fballiano merged commit e6a6b04 into OpenMage:main Feb 21, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Contacts Relates to Mage_Contacts translations Relates to app/locale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants